using System;

namespace ClassEntities
{
    [Serializable]
    public class tblDangKyLop
    {
        private int stt;
        private int idLH;
        private int idSV;
        private string ten;

        private DateTime ngaydangky;
        public tblDangKyLop()
        { }
        public tblDangKyLop(int stt, int idLH, int idSV, DateTime ngaydangky, string ten)
        {
            this.stt = stt;
            this.idLH = idLH;
            this.idSV = idSV;
            this.ten = ten;
            this.ngaydangky = ngaydangky;
        }
        public tblDangKyLop(int stt, int idLH, int idSV, DateTime ngaydangky)
        {
            this.stt = stt;
            this.idLH = idLH;
            this.idSV = idSV;
            this.ngaydangky = ngaydangky;
        }
        public int Stt
        {
            get { return this.stt; }
            set
            {
                if (value == null)
                    throw new Exception("stt not allow nullvalue.");
                this.stt = value;
            }
        }
        public int IdLH
        {
            get { return this.idLH; }
            set { this.idLH = value; }
        }
        public int IdSV
        {
            get { return this.idSV; }
            set { this.idSV = value; }
        }
        public DateTime Ngaydangky
        {
            get { return this.ngaydangky; }
            set { this.ngaydangky = value; }
        }
        public string Ten
        {
            get { return ten; }
            set { ten = value; }
        }
        public override string ToString()
        {
            return this.stt + "; " + this.idLH + "; " + this.idSV + "; " + this.ngaydangky + "; ";
        }
        public override bool Equals(Object obj)
        {
            tblDangKyLop me = (tblDangKyLop)obj;
            bool ret = this.Stt.Equals(me.Stt);
            return ret;
        }
        public override int GetHashCode()
        {
            return this.Stt.GetHashCode();
        }

    }
}